﻿using ExampleApplication.DL;
using SQLPXBase.Factory;
using SQLPXBase.Factory.Keys;

namespace ExampleApplication.Models.Base
{
    internal abstract class BaseModel:SQLPXBase.Factory.ChangeAwareness.ChangeAwareBaseModel<sql>
    {
        protected BaseModel(ModelFactory<sql> factory) : base(factory)
        {
        }

        private PrimaryKey id;
        public PrimaryKey Id
        {
            get { return id; }
        }

        public override PrimaryKey GetPK()
        {
            return id;
        }

        protected void SetPK(PrimaryKey id)
        {
            this.id = id;
        }
    }
}
